package cn.holy.app.xcddt.ui.activity.video

import android.annotation.TargetApi
import android.content.pm.ActivityInfo
import android.os.Build
import android.os.Handler
import androidx.core.view.ViewCompat
import android.transition.Transition
import android.view.View
import android.widget.ImageView
import cn.holy.app.xcddt.R
import cn.holy.app.xcddt.app.GlideApp
import cn.holy.app.xcddt.ui.activity.base.BaseActivity
import cn.jzvd.JZVideoPlayerStandard
import com.alibaba.android.arouter.facade.annotation.Route

import kotlinx.android.synthetic.main.activity_pay.*
import cn.jzvd.JZVideoPlayer




/**
 * Created by 69568 on 2018/3/5.
 */
@Route(path = "/app/video")
class PayVideoActivity : BaseActivity() {
    override fun initData() {

    }


    override fun initView() {
        var video_url = intent.getStringExtra("video_url")
//        val video_thumb_url = intent.getStringExtra("video_thumb_url")


        videoPlayer.backButton.setOnClickListener {
            finish()
        }
    }

    override fun onBackPressed() {
        if (JZVideoPlayer.backPress()) {
            return
        }
        super.onBackPressed()
    }

    override fun onPause() {
        super.onPause()
        JZVideoPlayer.releaseAllVideos()
    }


    override fun initLayout() {
        setContentView(R.layout.activity_pay)
    }

    override fun onDestroy() {
        super.onDestroy()
        videoPlayer.release()
//        orientationUtils?.releaseListener()
    }



}